package org.gtiles.components.login.authentication.impl;

import java.util.ArrayList;

import org.gtiles.components.login.authentication.AuthorizedDetails;
import org.gtiles.components.login.authentication.IAuthenticateDetails;
import org.gtiles.components.login.authentication.IAuthenticatedUser;

/**
 * 默认的资源包装对象，在登录认证成功后会调用此类进行可访问资源的包装。
 * @author LiuHG
 * @version 1.0
 */
public class AuthenticateDetailsImpl implements IAuthenticateDetails {

//	@Autowired
//	@Qualifier("roleService")
//	private IRoleService roleService;
//	
//	@Autowired
//	@Qualifier("userService")
//	private IUserService userService;
	
	/**
	 * 如果返回null，则Details值为WebAuthenticationDetails，该对象中包含客户端IP和sessionID
	 */
	@Override
	public AuthorizedDetails doDetails(IAuthenticatedUser user) {
		AuthorizedDetails authorizedDetails = new AuthorizedDetails();
		//TODO 
		authorizedDetails.setUserResources(new ArrayList<org.gtiles.components.login.pojo.IResource>());
		return authorizedDetails;
	}
}
